package com.five.service.impl;

import com.five.dao.FoundMapper;
import com.five.entity.Found;
import com.five.service.FoundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Zero on 2018/3/5.
 */
@Service("FoundService")
public class FoundServiceImpl implements FoundService {

    @Autowired
    private FoundMapper foundMapper;


    /**
     * 通过类型查找 “发现"
     * @param foundType
     * @return
     */
    @Override
    public List<Found> findFoundByType(String foundType) {
        return foundMapper.selectByFoundType(foundType);
    }


    /**
     * 通过id查询
     * @param foundId
     * @return
     */
    @Override
    public Found findFoundById(Integer foundId) {
        return foundMapper.selectByPrimaryKey(foundId);
    }
}
